import requests

resp = requests.get(url="https://www.baidu.com/")
print("状态码=", resp.status_code)
print("请求url=", resp.url)
print("响应头部字符编码=", resp.encoding)
print("头信息=", resp.headers)
print("cokkie信息=", resp.cookies)
print("文本形式响应的内容=", resp.text)
print("json形式响应的内容", resp.json())
